<?php
include '../webadmin/inc/global.php';
header("Content-type: application/json");
$get = getParameters();
$jsondata = array();
if(!isset($get['id']) || !is_numeric($get['id']) || !isset($_POST['viewpass'])){
	$jsondata = array('state'=>false,'msg'=>'参数错误！');
}else{
	$info = $db->getoners('select * from sen_article where `sen_article0` = '.$get['id'].' and sen_article1=25 limit 1');
	if($info){
		if(md5($_POST['viewpass']) == md5($info['sen_article12'])){
			$jsondata = array('state'=>true,'data'=>$info);
		}else{
			$jsondata = array('state'=>false,'msg'=>'查看密码不正确');
		}
	}else{
		$jsondata = array('state'=>false,'msg'=>'参数错误！');
	}
}
echo json_encode($jsondata);